/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entities;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author vasi
 */
@Entity
@Table(name="content_favorites")
public class ContentFavoritesEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name="cfid")
    private Long cfid;

    @Column(name="cid")
    private Long cid;

    @Column(name="uid")
    private Long uid;

    @Column(name="created")
    private Long created;

    public Long getCfid() {
        return cfid;
    }

    public void setCfid(Long cfid) {
        this.cfid = cfid;
    }

    public Long getCid() {
        return cid;
    }

    public void setCid(Long cid) {
        this.cid = cid;
    }

    public Long getCreated() {
        return created;
    }

    public void setCreated(Long created) {
        this.created = created;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cfid != null ? cfid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the cfid fields are not set
        if (!(object instanceof ContentFavoritesEntity)) {
            return false;
        }
        ContentFavoritesEntity other = (ContentFavoritesEntity) object;
        if ((this.cfid == null && other.cfid != null) || (this.cfid != null && !this.cfid.equals(other.cfid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.ContentFavoritesEntity[id=" + cfid + "]";
    }

}
